#if ZDCONF_FULL_REGTABLE == 1
#include "zd1205.h"
#include "zdtypes.h"
#include "zdregDomain.h"
#include <linux/types.h>
#include <linux/delay.h>

#define NUM_COUNTRY_TBL ( sizeof (countryToRegionTbl) / sizeof (COUNTRY_TABLE) )
#if 0
typedef struct _COUNTRY_TABLE {
    U8       CountryCode1;
    U8       CountryCode2;
    U8       Zero;
    U8       regionCode;
} COUNTRY_TABLE, *PCOUNTRY_TABLE;

COUNTRY_TABLE countryToRegionTbl[] = {
    {'A','F',0,  49},   // %Afghanistan%
    {'A','L',0,  49},   // %Albania%
    {'D','Z',0,  49},   // %Algeria%
    {'A','S',0,  16},   // %AmericanSamoa%
    {'A','D',0,  49},   // %Andorra%
    {'A','O',0,  49},   // %Angola%
    {'A','I',0,  49},   // %Anguilla%
    {'A','Q',0,  16},   // %Antarctica%
    {'A','G',0,  16},   // %AntiguaandBarbuda%
    {'A','R',0,  33},   // %Argentina%
    {'A','M',0,  49},   // %Armenia%
    {'A','W',0,  16},   // %Aruba%
    {'A','U',0,  66},   // %Australia%
    {'A','T',0,  52},   // %Austria%
    {'A','Z',0,  49},   // %Azerbaijan%
    {'B','S',0,  16},   // %BahamasThe%
    {'B','H',0,  114},   // %Bahrain%
    {'B','D',0,  49},   // %Bangladesh%
    {'B','B',0,  16},   // %Barbados%
    {'B','Y',0,  49},   // %Belarus%
    {'B','E',0,  54},   // %Belgium%
    {'B','Z',0,  49},   // %Belize%
    {'B','J',0,  49},   // %Benin%
    {'B','M',0,  16},   // %Bermuda%
    {'B','T',0,  49},   // %Bhutan%
    {'B','O',0,  16},   // %Bolivia%
    {'B','A',0,  49},   // %BosniaandHerzegovina%
    {'B','W',0,  49},   // %Botswana%
    {'B','V',0,  16},   // %BouvetIsland%
    {'B','R',0,  34},   // %Brazil%
    {'I','O',0,  49},   // %BritishIndianOceanTerritory%
    {'B','N',0,  49},   // %Brunei%
    {'B','G',0,  95},   // %Bulgaria%
    {'B','F',0,  49},   // %BurkinaFaso%
    {'B','I',0,  49},   // %Burundi%
    {'K','H',0,  49},   // %Cambodia%
    {'C','M',0,  16},   // %Cameroon%
    {'C','A',0,  16},   // %Canada%
    {'C','V',0,  49},   // %CapeVerde%
    {'K','Y',0,  49},   // %CaymanIslands%
    {'C','F',0,  16},   // %CentralAfricanRepublic%
    {'T','D',0,  16},   // %Chad%
    {'C','L',0,  125},   // %Chile%
    {'C','N',0,  67},   // %China%
    {'C','X',0,  16},   // %ChristmasIsland%
    {'C','C',0,  16},   // %CocosKeelingIslands%
    {'C','O',0,  126},   // %Colombia%
    {'K','M',0,  49},   // %Comoros%
    {'C','D',0,  49},   // %CongoDRC%
    {'C','G',0,  49},   // %Congo%
    {'C','K',0,  16},   // %CookIslands%
    {'C','R',0,  16},   // %CostaRica%
    {'C','I',0,  49},   // %CotedIvoire%
    {'H','R',0,  96},   // %Croatia%
    {'C','U',0,  00},   // %Cuba%
    {'C','Y',0,  97},   // %Cyprus%
    {'C','Z',0,  98},   // %CzechRepublic%
    {'D','K',0,  82},   // %Denmark%
    {'D','J',0,  49},   // %Djibouti%
    {'D','M',0,  49},   // %Dominica%
    {'D','O',0,  49},   // %DominicanRepublic%
    {'T','L',0,  00},   // %EastTimor%
    {'E','C',0,  127},   // %Ecuador%
    {'E','G',0,  115},   // %Egypt%
    {'S','V',0,  00},   // %ElSalvador%
    {'G','Q',0,  00},   // %EquatorialGuinea%
    {'E','R',0,  00},   // %Eritrea%
    {'E','E',0,  99},   // %Estonia%
    {'E','T',0,  00},   // %Ethiopia%
    {'F','K',0,  00},   // %FalklandIslandsIslasMalvinas%
    {'F','O',0,  00},   // %FaroeIslands%
    {'F','J',0,  00},   // %FijiIslands%
    {'F','I',0,  83},   // %Finland%
    {'F','R',0,  50},   // %France%
    {'G','F',0,  00},   // %FrenchGuiana%
    {'P','F',0,  00},   // %FrenchPolynesia%
    {'T','F',0,  00},   // %FrenchSouthernandAntarcticLands%
    {'G','A',0,  00},   // %Gabon%
    {'G','M',0,  00},   // %Gambia%
    {'G','E',0,  00},   // %Georgia%
    {'D','E',0,  84},   // %Germany%
    {'G','H',0,  00},   // %Ghana%
    {'G','I',0,  00},   // %Gibraltar%
    {'G','R',0,  85},   // %Greece%
    {'G','L',0,  00},   // %Greenland%
    {'G','D',0,  00},   // %Grenada%
    {'G','P',0,  00},   // %Guadeloupe%
    {'G','U',0,  00},   // %Guam%
    {'G','T',0,  00},   // %Guatemala%
    {'G','W',0,  00},   // %GuineaBissau%
    {'G','N',0,  00},   // %Guinea%
    {'G','Y',0,  00},   // %Guyana%
    {'H','T',0,  00},   // %Haiti%
    {'H','M',0,  00},   // %HeardIslandandMcDonaldIslands%
    {'H','N',0,  00},   // %Honduras%
    {'H','K',0,  68},   // %HongKongSAR%
    {'H','U',0,  100},   // %Hungary%
    {'I','S',0,  86},   // %Iceland%
    {'I','N',0,  109},   // %India%
    {'I','D',0,  110},   // %Indonesia%
    {'I','R',0,  00},   // %Iran%
    {'I','Q',0,  00},   // %Iraq%
    {'I','E',0,  87},   // %Ireland%
    {'I','L',0,  80},   // %Israel%
    {'I','T',0,  88},   // %Italy%
    {'J','M',0,  00},   // %Jamaica%
    {'J','P',0,  64},   // %Japan%
    {'J','O',0,  116},   // %Jordan%
    {'K','Z',0,  00},   // %Kazakhstan%
    {'K','E',0,  00},   // %Kenya%
    {'K','I',0,  00},   // %Kiribati%
    {'K','R',0,  69},   // %Korea%
    {'K','W',0,  117},   // %Kuwait%
    {'K','G',0,  00},   // %Kyrgyzstan%
    {'L','A',0,  00},   // %Laos%
    {'L','V',0,  101},   // %Latvia%
    {'L','B',0,  118},   // %Lebanon%
    {'L','S',0,  00},   // %Lesotho%
    {'L','R',0,  00},   // %Liberia%
    {'L','Y',0,  00},   // %Libya%
    {'L','I',0,  133},   // %Liechtenstein%
    {'L','T',0,  102},   // %Lithuania%
    {'L','U',0,  89},   // %Luxembourg%
    {'M','O',0,  00},   // %MacauSAR%
    {'M','K',0,  00},   // %MacedoniaFormerYugoslavRepublicof%
    {'M','G',0,  00},   // %Madagascar%
    {'M','W',0,  00},   // %Malawi%
    {'M','Y',0,  111},   // %Malaysia%
    {'M','V',0,  00},   // %Maldives%
    {'M','L',0,  00},   // %Mali%
    {'M','T',0,  49},   // %Malta%
    {'M','H',0,  00},   // %MarshallIslands%
    {'M','Q',0,  00},   // %Martinique%
    {'M','R',0,  00},   // %Mauritania%
    {'M','U',0,  00},   // %Mauritius%
    {'Y','T',0,  00},   // %Mayotte%
    {'M','X',0,  81},   // %Mexico%
    {'F','M',0,  00},   // %Micronesia%
    {'M','D',0,  00},   // %Moldova%
    {'M','C',0,  49},   // %Monaco%
    {'M','N',0,  00},   // %Mongolia%
    {'M','S',0,  00},   // %Montserrat%
    {'M','A',0,  119},   // %Morocco%
    {'M','Z',0,  00},   // %Mozambique%
    {'M','M',0,  00},   // %Myanmar%
    {'N','A',0,  00},   // %Namibia%
    {'N','R',0,  00},   // %Nauru%
    {'N','P',0,  00},   // %Nepal%
    {'A','N',0,  00},   // %NetherlandsAntilles%
    {'N','L',0,  90},   // %NetherlandsThe%
    {'N','C',0,  00},   // %NewCaledonia%
    {'N','Z',0,  70},   // %NewZealand%
    {'N','I',0,  16},   // %Nicaragua%
    {'N','E',0,  00},   // %Niger%
    {'N','G',0,  00},   // %Nigeria%
    {'N','U',0,  00},   // %Niue%
    {'N','F',0,  00},   // %NorfolkIsland%
    {'K','P',0,  00},   // %NorthKorea%
    {'M','P',0,  00},   // %NorthernMarianaIslands%
    {'N','O',0,  91},   // %Norway%
    {'O','M',0,  120},   // %Oman%
    {'P','K',0,  00},   // %Pakistan%
    {'P','W',0,  00},   // %Palau%
    {'P','S',0,  00},   // %PalestinianAuthority%
    {'P','A',0,  16},   // %Panama%
    {'P','G',0,  00},   // %PapuaNewGuinea%
    {'P','Y',0,  00},   // %Paraguay%
    {'P','E',0,  128},   // %Peru%
    {'P','H',0,  112},   // %Philippines%
    {'P','N',0,  00},   // %Pitcairn%
    {'P','L',0,  103},   // %Poland%
    {'P','T',0,  92},   // %Portugal%
    {'P','R',0,  00},   // %PuertoRico%
    {'Q','A',0,  00},   // %Qatar%
    {'R','E',0,  00},   // %Reunion%
    {'R','O',0,  104},   // %Romania%
    {'R','U',0,  105},   // %Russia%
    {'R','W',0,  00},   // %Rwanda%
    {'W','S',0,  00},   // %Samoa%
    {'S','M',0,  00},   // %SanMarino%
    {'S','T',0,  00},   // %SaoTomeandPrincipe%
    {'S','A',0,  121},   // %SaudiArabia%
    {'S','N',0,  00},   // %Senegal%
    {'S','C',0,  00},   // %Seychelles%
    {'S','L',0,  00},   // %SierraLeone%
    {'S','G',0,  71},   // %Singapore%
    {'S','K',0,  106},   // %Slovakia%
    {'S','I',0,  107},   // %Slovenia%
    {'S','B',0,  16},   // %SolomonIslands%
    {'S','O',0,  49},   // %Somalia%
    {'Z','A',0,  122},   // %SouthAfrica%
    {'G','S',0,  00},   // %SouthGeorgiaandtheSouthSandwichIslands%
    {'E','S',0,  49},   // %Spain%
    {'L','K',0,  00},   // %SriLanka%
    {'S','H',0,  00},   // %StHelena%
    {'K','N',0,  00},   // %StKittsandNevis%
    {'L','C',0,  00},   // %StLucia%
    {'P','M',0,  00},   // %StPierreandMiquelon%
    {'V','C',0,  00},   // %StVincentandtheGrenadines%
    {'S','D',0,  00},   // %Sudan%
    {'S','R',0,  00},   // %Suriname%
    {'S','J',0,  00},   // %SvalbardandJanMayen%
    {'S','Z',0,  00},   // %Swaziland%
    {'S','E',0,  93},   // %Sweden%
    {'C','H',0,  53},   // %Switzerland%
    {'S','Y',0,  00},   // %Syria%
    {'T','W',0,  72},   // %Taiwan%
    {'T','J',0,  00},   // %Tajikistan%
    {'T','Z',0,  00},   // %Tanzania%
    {'T','H',0,  113},   // %Thailand%
    {'T','G',0,  00},   // %Togo%
    {'T','K',0,  00},   // %Tokelau%
    {'T','O',0,  00},   // %Tonga%
    {'T','T',0,  00},   // %TrinidadandTobago%
    {'T','N',0,  00},   // %Tunisia%
    {'T','R',0,  108},   // %Turkey%
    {'T','M',0,  00},   // %Turkmenistan%
    {'T','C',0,  00},   // %TurksandCaicosIslands%
    {'T','V',0,  00},   // %Tuvalu%
    {'U','G',0,  00},   // %Uganda%
    {'U','A',0,  51},   // %Ukraine%
    {'A','E',0,  123},   // %UnitedArabEmirates%
    {'G','B',0,  94},   // %UnitedKingdom%
    {'U','M',0,  16},   // %UnitedStatesMinorOutlyingIslands%
    {'U','S',0,  16},   // %UnitedStates%
    {'U','Y',0,  129},   // %Uruguay%
    {'U','Z',0,  00},   // %Uzbekistan%
    {'V','U',0,  00},   // %Vanuatu%
    {'V','A',0,  00},   // %VaticanCity%
    {'V','E',0,  130},   // %Venezuela%
    {'V','N',0,  00},   // %VietNam%
    {'V','G',0,  00},   // %VirginIslandsBritish%
    {'V','I',0,  00},   // %VirginIslands%
    {'W','F',0,  00},   // %WallisandFutuna%
    {'E','H',0,  00},   // %WesternSahara%
    {'Y','E',0,  00},   // %Yemen%
    {'Y','U',0,  00},   // %Yugoslavia%
    {'Z','M',0,  00},   // %Zambia%
    {'Z','W',0,  00},   // %Zimbabwe%
    {'0','0',0,  00}    // Default
};
#endif
typedef enum _ZD_REGION
{
    ZD_Region_Default           = 0x00,//G channel->ch1-11; A channel->36~64,149~165;
    ZD_Region_USA               = 0x10,//G channel->ch1-11; A channel->36~64,149~165;
    ZD_Region_Canada            = 0x20,//G channel->ch1-11; A channel->36~64,149~165;
    ZD_Region_Argentina         = 0x21,//G channel->ch1-11; A channel->52~64,149~165;
    ZD_Region_Brazil            = 0x22,//G channel->ch1-11; A channel->149~165;
    ZD_Region_Europe            = 0x30,//G channel->ETSI ch1-13;A channel->36~64,100~140
    ZD_Region_Spain             = 0x31,//G channel->ETSI ch1-13;A channel->36~64,100~140
    ZD_Region_France            = 0x32,//G channel->ch10-13;A channel->36~64
    ZD_Region_Ukraine           = 0x33,//G channel->ch1-11; A channel->36~64,100~140
    ZD_Region_Austria           = 0x34,//G channel->ch1-13;;A channel->36~64
    ZD_Region_Switzerland       = 0x35,//G channel->ch1-13;A channel->36~48
    ZD_Region_Belgium           = 0x36,//G channel->ch1-13;;A channel->36~64,100~140
    ZD_Region_Japan_1           = 0x40,//G channel->ch1-14; A channel->8~16,36~48; 38, 42, and 46 not included  
    ZD_Region_Japan_2           = 0x41,//G channel->ch1-14; A channel->8~16,34~46;
    ZD_Region_Japan_3           = 0x49,//G channel->ch1-13; A channel->8~16,34~46;
    ZD_Region_Australia         = 0x42,//G channel->ch1-13; A channel->36~64,149~161;
    ZD_Region_China             = 0x43,//G channel->ch1-11; A 149~165;
    ZD_Region_HongKong          = 0x44,//G channel->ch1-11; A channel->48~64,149~165;
    ZD_Region_Korea             = 0x45,//G channel->ch1-11; A channel->149~161;
    ZD_Region_NewZealand        = 0x46,//G channel->ch1-11; A channel->48~64,149~165;
    ZD_Region_Singapore         = 0x47,//G channel->ch10-13;A channel->34~48,149~165;
    ZD_Region_Taiwan            = 0x48,//G channel->ch1-13;A channel->52~64,149~161;
    ZD_Region_Israel            = 0x50,//G channel->ch3-9
    ZD_Region_Mexico            = 0x51, //G channel->ch10,11
    ZD_Region_Denmark           = 0x52,
    ZD_Region_Finland           = 0x53,
    ZD_Region_Germany           = 0x54,
    ZD_Region_Greece            = 0x55,
    ZD_Region_Iceland           = 0x56,
    ZD_Region_Ireland           = 0x57,
    ZD_Region_Italy             = 0x58,
    ZD_Region_Luxembourg        = 0x59,
    ZD_Region_Netherlands       = 0x5A,
    ZD_Region_Norway            = 0x5B,
    ZD_Region_Portugal          = 0x5C,
    ZD_Region_Sweden            = 0x5D,
    ZD_Region_UnitedKingdom     = 0x5E,
    ZD_Region_Bulgaria          = 0x5F,
    ZD_Region_Croatia           = 0x60,
    ZD_Region_Cyprus            = 0x61,
    ZD_Region_CzechRepublic     = 0x62,
    ZD_Region_Estonia           = 0x63,
    ZD_Region_Hungary           = 0x64,
    ZD_Region_Latvia            = 0x65,
    ZD_Region_Lithuania         = 0x66,
    ZD_Region_Poland            = 0x67,
    ZD_Region_Romania           = 0x68,
    ZD_Region_Russia            = 0x69,
    ZD_Region_Slovakia          = 0x6A,
    ZD_Region_Slovenia          = 0x6B,
    ZD_Region_Turkey            = 0x6C,
    ZD_Region_India             = 0x6D,
    ZD_Region_Indonesia         = 0x6E,
    ZD_Region_Malaysia          = 0x6F,
    ZD_Region_Philippines       = 0x70,
    ZD_Region_Thailand          = 0x71,
    ZD_Region_Bahrain           = 0x72,
    ZD_Region_Egypt             = 0x73,
    ZD_Region_Jordan            = 0x74,
    ZD_Region_Kuwait            = 0x75,
    ZD_Region_Lebanon           = 0x76,
    ZD_Region_Morocco           = 0x77,
    ZD_Region_Oman              = 0x78,
    ZD_Region_SaudiArabia       = 0x79,
    ZD_Region_SouthAfrica       = 0x7A,
    ZD_Region_UnitedArabEmirates  = 0x7B,
    ZD_Region_Chile             = 0x7D,
    ZD_Region_Colombia          = 0x7E,
    ZD_Region_Ecuador           = 0x7F,
    ZD_Region_Peru              = 0x80,
    ZD_Region_Uruguay           = 0x81,
    ZD_Region_Venezuela         = 0x82,
    ZD_Region_Europe2           = 0x83,
    ZD_Region_France2           = 0x84,
    ZD_Region_Liechtenstein     = 0x85,
    
// kevin adds:
    Region_Israel               = 0x07,//G: 5-7; A:?
    Region_ETSI                 = 0x37,//G: 1-13; A:?
    Region_MKK1                 = 0x4c,//G: 1-13; A:?
    Region_Albania              = 0xd0,//G: 1-13; A:?
    Region_Algeria              = 0xd1,//G: 1-13; A:?
    Region_Armenia              = 0xd2,//G: 1-13; A:?
    Region_Azerbaijan           = 0xd3,//G: 1-13; A:?
    Region_Belarus              = 0xd4,//G: 1-13; A:?
    Region_Belize               = 0xd5,//G: 1-13; A:?
    Region_Bolvia               = 0xd6,//G: 1-13; A:?
    Region_Brunei_Darussalam    = 0xd7,//G: 1-13; A:?
    Region_Costa_Rica           = 0xd8,//G: 1-13; A:?
    Region_Dominican_Republic   = 0xd9,//G: 1-11; A:?
    Region_El_Salvador          = 0xda,//G: 1-13; A:?
    Region_Georgia              = 0xdb,//G: 1-13; A:?
    Region_Guatemala            = 0xdc,//G: 1-11; A:?
    Region_Honduras             = 0xdd,//G: 1-13; A:?
    Region_Iran                 = 0xde,//G: 1-13; A:?
    Region_Kazakhstan           = 0xdf,//G: 1-13; A:?
    Region_North_Korea          = 0xe0,//G: 1-13; A:?
    Region_Macau                = 0xe3,//G: 1-13; A:?
    Region_Macedonia            = 0xe4,//G: 1-13; A:?
    Region_Malta                = 0xe5,//G: 1-13; A:?
    Region_Monaco               = 0xe6,//G: 1-13; A:?
    Region_Pakistan             = 0xe7,//G: 1-13; A:?
    Region_Panama               = 0xe8,//G: 1-11; A:?
    Region_Puerto_Rico          = 0xe9,//G: 1-11; A:?
    Region_Qatar                = 0xea,//G: 1-13; A:?
    Region_Syria                = 0xec,//G: 1-13; A:?
    Region_Trinidad_Tobago      = 0xed,//G: 1-13; A:?
    Region_Tunisia              = 0xee,//G: 1-13; A:?
    Region_United_States        = 0xef,//G: 1-11; A:?
    Region_Vietnam              = 0xf1,//G: 1-13; A:?
    Region_Yemen                = 0xf2,//G: 1-13; A:?
    Region_Zimbabwe             = 0xf3, //G: 1-13; A:?

// add for MSFT sputnik project
    Region_FCC5_FCCA          = 0x9F, 
    Region_APL2_FCCA          = 0xCF
} ZD_REGION, *PZD_REGION;
typedef struct _ZDTYPE_RegulationTab
{
    U16     RegionCode;
    int        g_AllowedCHCnt;
    int        a_AllowedCHCnt;
    int        g_AllowedCH[14];
    int        a_AllowedCH[35];
    int        a_AllowedCHPowerlimit[35];
} ZDTYPE_RegulationTab, *PZDTYPE_RegulationTab;
#define   ZD_REGULATION_TABLE_SIZE      ( sizeof(ZDRegulationTable)/sizeof(ZDTYPE_RegulationTab) )

ZDTYPE_RegulationTab ZDRegulationTable[] =
{ //  Region Code                 G_CHCnt   A_CHCnt   
  //            G_AllowedCH 
  //            A_AllowedCH
    { ZD_Region_Default,          14,       35,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14 }, 
                {   8,  12,  16,  34,  36,  38,  40,  42,  44,  46,  48,  52,  56,  60,  
                   64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 
                  157, 161, 165, 184, 188, 192, 196 },
                {   30,  30,  30,  30,  30,  30,  30,  30,  30,  30,  30,  30,  30,  30,  
                   30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 
                  30, 30, 30, 30, 30, 30, 30 }
    },
    { ZD_Region_USA,              11,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  17,  17,  17,  17,  24,  24,  24,  24, 30, 30, 30, 30, 30 }
    },
    { ZD_Region_Canada,           11,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23,  24,  24,  24,  24, 120, 120, 120, 120, 120 }
    },
    { ZD_Region_Argentina,        11,        9,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  24,  24,  24,  24, 30, 30, 30, 30, 30 }
    },
    { ZD_Region_Brazil,           11,        24,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                { 36,  40,  44,  48,  52,  56,  60,  64,100, 104, 108, 112, 116, 
                 120,124, 128, 132, 136, 140,149, 153, 157, 161, 165 },
                { 17,  17,  17,  17,  24,  24,  24,  24, 24, 24, 24, 24, 
                  24, 24, 24, 24, 24, 24, 24,17, 17, 17, 17, 17 }
    },
    { ZD_Region_Europe,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Spain,            13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_France,            4,        8,       
                {  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Ukraine,          11,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Austria,          13,        19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  18,  18,  18,  18,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Belgium,          13,        8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64},
                {  23,  23,  23,  23,  23,  23,  23,  23}
    },
    { ZD_Region_Switzerland,      13,        8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    /* Derek for Japan minddle band 2007-03-13
    { ZD_Region_Japan_1,          14,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14 }, 
                {   36,  40,  44,  48,  52,  56,  60, 64  },
                {   23,  23,  23,  23,  23,  23,  23, 23  }
    },
    { ZD_Region_Japan_2,          14,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14 }, 
                {   34, 36,  38,  40,  42,  44,  46,  48,  52,  56,  60, 64  },
                {   23,  23,  23,  23,  23,  23,  23, 23 ,  23,  23,  23, 23  }
    },
    { ZD_Region_Japan_3,          13,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {   34, 36,  38,  40,  42,  44,  46,  48,  52,  56,  60, 64  },
                {   23,  23,  23,  23,  23,  23,  23, 23 ,  23,  23,  23, 23  }
    },
    */
    //Derek,2007-03-13
    { ZD_Region_Japan_1,          14,      19,       
                {   1,     2,    3,   4,    5,    6,    7,   8,   9,  10,  11,  12, 13,  14}, 
                {   36,  40,  44,  48,  52,  56,  60, 64,100,104,108,112,116,120,124,128,132,136,140},
                {   23,  23,  23,  23,  23,  23,  23, 23,  23,  23,  23, 23, 23,  23,  23,  23,  23,  23, 23}
    },
    { ZD_Region_Japan_2,          14,      19,       
                {   1,     2,    3,   4,    5,    6,    7,   8,   9,  10,  11,  12, 13,  14}, 
                {   36,  40,  44,  48,  52,  56,  60, 64,100,104,108,112,116,120,124,128,132,136,140},
                {   23,  23,  23,  23,  23,  23,  23, 23,  23,  23,  23, 23, 23,  23,  23,  23,  23,  23, 23}
    },
    { ZD_Region_Japan_3,          14,      19,       
                {   1,     2,    3,   4,    5,    6,    7,   8,   9,  10,  11,  12, 13,  14}, 
                {   36,  40,  44,  48,  52,  56,  60, 64,100,104,108,112,116,120,124,128,132,136,140},
                {   23,  23,  23,  23,  23,  23,  23, 23,  23,  23,  23, 23, 23,  23,  23,  23,  23,  23, 23}
    },
    /*
    { ZD_Region_Australia,        11,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30 }
    },*/
    //Derek,2007-03-14
    { ZD_Region_Australia,        13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {   36,  40,  44,  48,  52,  56,  60, 64,100,104,108,112,116,120,124,128,132,136,140},
                {   23,  23,  23,  23,  23,  23,  23, 23,  23,  23,  23, 23, 23,  23,  23,  23,  23,  23, 23}

    },
    { ZD_Region_China,            11,        4,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                { 149, 153, 157, 161 },
                { 41, 41, 41, 41 }
    },
    { ZD_Region_HongKong,         11,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 36, 36, 36, 36 }
    },
    /*
    { ZD_Region_NewZealand,       11,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23,  30,  30,  30,  30, 60, 60, 60, 60, 60 }
    },*/
    //Derek,2007-03-14
    { ZD_Region_NewZealand,       13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {   36,  40,  44,  48,  52,  56,  60, 64,100,104,108,112,116,120,124,128,132,136,140},
                {   23,  23,  23,  23,  23,  23,  23, 23,  23,  23,  23, 23, 23,  23,  23,  23,  23,  23, 23}

    },
    { ZD_Region_Korea,            11,        18,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                { 36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120, 149, 153, 157, 161 },
                { 23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30, 27, 27, 27, 27 }
    },
    { ZD_Region_Singapore,         4,        13,       
                {  10,  11,  12,  13 }, 
                {  36,  40,  44,  48, 52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23, 23,  23,  23,  23, 20, 20, 20, 20, 20 }
    },
    { ZD_Region_Taiwan,           13,        8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  52,  56,  60,  64, 149, 153, 157, 161 },
                {  17,  17,  17,  17, 30, 30, 30, 30 }
    },
    { ZD_Region_Israel,            7,       0,       
                {   3,   4,   5,   6,   7,   8,   9 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Mexico,            1,       12,       
                {  10 }, 
                {  36,  40,  44,  48, 52,  56,  60,  64, 149, 153, 157, 161 },
                {  23,  23,  23,  23, 23,  23,  23,  23, 36, 36, 36, 36 }
    },
    { ZD_Region_Denmark,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Finland,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Germany,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Greece,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Iceland,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Ireland,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Italy,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Luxembourg,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Netherlands,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Norway,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Portugal,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Sweden,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_UnitedKingdom,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Bulgaria,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Croatia,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Cyprus,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_CzechRepublic,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Estonia,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Hungary,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Latvia,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Lithuania,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Poland,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Romania,           13,       0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                { 0},
                { 0}
    },
    { ZD_Region_Russia,           11,       0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                { 0},
                { 0}
    },
    { ZD_Region_Slovakia,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64},
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Slovenia,           13,       19,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30 }
    },
    { ZD_Region_Turkey,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_India,         13,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 23, 23, 23, 23, 23 }
    },
    { ZD_Region_Indonesia,         13,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {   149, 153, 157, 161, 165 },
                {   20,  20,  20,  20,  20  }
    },
    { ZD_Region_Malaysia,         11,       9,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {   52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {   23,  23,  23,  23,  30,  30,  30,  30,  30 }
    },
    { ZD_Region_Philippines,         11,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {   149, 153, 157, 161, 165 },
                {   30,  30,  30,  30,  30  }
    },
    { ZD_Region_Thailand,         13,       0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Bahrain,         13,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161 },
                {  20,  20,  20,  20,  20,  20,  20,  20, 20, 20, 20, 20 }
    },
    { ZD_Region_Egypt,         13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Jordan,         13,       9,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  36,  40,  44,  48, 149, 153, 157, 161, 165 },
                {  20,  20,  20,  20,  20,  20,  20,  20, 20 }
    },
    { ZD_Region_Kuwait,         13,      0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Lebanon,         13,      0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Morocco,         13,      0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Oman,         13,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  20,  20,  20,  20,  20,  20,  20,  20, 20, 20, 20, 20, 20 }
    },
    { ZD_Region_SaudiArabia,         11,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 23, 23, 23, 23 }
    },
    { ZD_Region_SouthAfrica,           13,       24,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 100, 104, 108, 112, 116, 120,
                  124, 128, 132, 136, 140, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 30, 30, 30, 30, 30, 30,
                  30, 30, 30, 30, 30, 23, 23, 23, 23, 23 }
    },
    { ZD_Region_UnitedArabEmirates,         13,      0,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11, 12, 13 }, 
                {  0 },
                {  0 }
    },
    { ZD_Region_Chile,           11,       13,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161, 165 },
                {  23,  23,  23,  23,  23,  23,  23,  23, 17,  17,  17,  17,  17  }
    },
    { ZD_Region_Colombia,           11,       12,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  36,  40,  44,  48,  52,  56,  60,  64, 149, 153, 157, 161 },
                {  17,  17,  17,  17,  24,  24,  24,  24, 17,  17,  17,  17 }
    },
    { ZD_Region_Ecuador,           11,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  149, 153, 157, 161,165 },
                {  30,  30,  30,  30, 30 }
    },
    { ZD_Region_Peru,           11,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  149, 153, 157, 161 },
                {  20,  20,  20,  20 }
    },
    { ZD_Region_Uruguay,           11,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  149, 153, 157, 161,165 },
                {  30,  30,  30,  30, 30 }
    },
    { ZD_Region_Venezuela,           11,       5,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  149, 153, 157, 161,165 },
                {  30,  30,  30,  30, 30 }
    },
    { ZD_Region_Europe2,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_France2,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
    { ZD_Region_Liechtenstein,           13,       8,       
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36,  40,  44,  48,  52,  56,  60,  64 },
                {  23,  23,  23,  23,  23,  23,  23,  23 }
    },
// kevin adds:  
    { Region_Israel,           3,       0,                              //Kevin 2007-05-23
                {   5,   6,   7 }, 
                {  36 },
                {  20 }
    },
    /*{ Region_ETSI,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },*/
    { Region_MKK1,           13,       1,                               //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Albania,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Algeria,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Armenia,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Azerbaijan,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Belarus,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Belize,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Bolvia,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Brunei_Darussalam,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Costa_Rica,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Dominican_Republic,           11,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36 },
                {  20 }
    },
    { Region_El_Salvador,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Georgia,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Guatemala,           11,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36 },
                {  20 }
    },
    { Region_Honduras,           13,       1,                               //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Iran,           13,       1,                               //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Kazakhstan,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_North_Korea,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Macau,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Macedonia,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Malta,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Monaco,           13,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Pakistan,           13,       1,                               //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Panama,           11,       1,                             //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36 },
                {  20 }
    },
    { Region_Puerto_Rico,           11,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36 },
                {  20 }
    },
    { Region_Qatar,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Syria,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Trinidad_Tobago,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Tunisia,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_United_States,           11,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11 }, 
                {  36 },
                {  20 }
    },
    { Region_Vietnam,           13,       1,                            //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Yemen,           13,       1,                              //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },
    { Region_Zimbabwe,           13,       1,                               //Kevin 2007-05-23
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13 }, 
                {  36 },
                {  20 }
    },

// add for MSFT sputnik project
    { Region_FCC5_FCCA,         11,       9,        
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  36,  40, 44,  48, 149, 153, 157, 161, 165 },
                {  17,  17, 17,  17,  20,  20,  20,  20,  20 }
    },
    { Region_APL2_FCCA,         11,       4,        
                {   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11}, 
                {  149, 153, 157, 161 },
                {   30,  30,  30,  30 }    
    },
};
PZDTYPE_RegulationTab GetRegulationElement(U16  RegionCode)
{
    int i, index;

    for( i=0; i<ZD_REGULATION_TABLE_SIZE; i++ )
    {
        if ( ZDRegulationTable[i].RegionCode == RegionCode )
            break;
    }
    if(i >= ZD_REGULATION_TABLE_SIZE)
        return NULL;
    else
        return (&(ZDRegulationTable[i]));

}
#if 0
U16 CountryToRegion(PU8 pCountryCode)
{
    U32    i;
    PCOUNTRY_TABLE  pCountryTbl=&countryToRegionTbl[0];
    
    for (i=0; i<NUM_COUNTRY_TBL; i++)
    {
        if (memcmp(&pCountryTbl->CountryCode1, pCountryCode, 2)==0)
        {
            if (pCountryTbl->regionCode==0)
                return ZD_Region_USA; // Use USA as default
            else
                return pCountryTbl->regionCode;
        }
        pCountryTbl++;
    }
    return ZD_Region_USA;
}
#endif

U32 zd_getReg_AllowedChannel(U16 regID)
{
    int i, def = 0;
    U32 AllowChannel = 0;
    PZDTYPE_RegulationTab pRegion;
    pRegion = GetRegulationElement(regID);
    if(pRegion == NULL)
    {
        printk("regID = %d, Not Found\n", regID);
        return 0;
    }

    if(pRegion->g_AllowedCHCnt > 14)
        printk("Allowed G Channel > 14  !?\n");
    for(i=0;i< pRegion->g_AllowedCHCnt;i++)
    {
        AllowChannel |= ( 1 << i);
        if(def == 0) def= i+1;
    }
    return (AllowChannel + (def << 16));
}
#endif
